﻿@page
@model WXWorkSvc.Areas.Admin.Pages.Agent.IndexModel

@{
    ViewData["Title"] = "第三方应用";
}
<nav aria-label='breadcrumb'>
    <ol class='breadcrumb'>
        <li class='breadcrumb-item active' aria-current='page'>
            @ViewBag.Title
        </li>
    </ol>
</nav>

<table class="table">
    <thead>
        <tr>
            <th>
                @Html.DisplayNameFor(model => model.TAgent[0].Suite.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TAgent[0].Corp.Name)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TAgent[0].AgentId)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TAgent[0].DTExpiresToken)
            </th>
            <th>
                @Html.DisplayNameFor(model => model.TAgent[0].DTExpiresTicket)
            </th>
            <th></th>
        </tr>
    </thead>
    <tbody>
        @foreach (var item in Model.TAgent)
        {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem => item.Suite.Name)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.Corp.Name)
                </td>
                <td title="@($"PermanentCode:{item.PermanentCode}\r\nToken:{item.Token}\r\nJsTicket:{item.JsTicket}\r\nAgentJsTicket:{item.AgentJsTicket}")">
                    @Html.DisplayFor(modelItem => item.AgentId)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DTExpiresToken)
                </td>
                <td>
                    @Html.DisplayFor(modelItem => item.DTExpiresTicket)
                </td>
                <td>
                    <a asp-page="./UserList" asp-route-suiteId="@item.SuiteId" asp-route-corpId="@item.CorpId">User...</a>
                </td>
            </tr>
        }
    </tbody>
</table>
